'use strict';

const Service = require('egg').Service;

class RoutersService extends Service {
  async find() {
    const { ctx } = this;
    const list = ctx.model.Routers.find().limit(Number(10));
    const count = ctx.model.Routers.find().count();
    const res = {
      count,
      list,
    };
    console.log('-0------------------');
    console.log(res);
    console.log('-0------------------');

    return list;
  }
}
module.exports = RoutersService;
